# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-mido
_pkgname=mido
pkgver=1.3.3
pkgrel=1
pkgdesc='MIDI Objects for Python.'
arch=('any')
url='https://pypi.org/project/mido/#files'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('9a9b983b7d2cc6ea530f98df09bc84690dfc980467726217023991a680a7c3f294bb0ffac730e79dcc5a3e4afccacfb4423791df290a035260513a5f7cc26152')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

	pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

